<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
<meta name="language" content="EN" scheme="DCTERMS.RFC3066" />
<meta name="creator"
	content="Felix Nagel, http://www.felixnagel.com for Namics (Deutschland) GmbH, http://www.namics.com" />
<script type="text/javascript">
	$(function() {
		var table1 = $("table").ariaSorTable({
			rowsToShow : 10,
			pager : true,
			onInit : function() {
				demoControl();
			},
			colsToHide : {
				1 : true,
				7 : true
			}
		});
		$("#destroy").click(function(event) {
			table1.ariaSorTable('destroy');
		});
		$("#disable").click(function(event) {
			table1.ariaSorTable('disable');
		});

		// add themeswitcher
		var ts = $(
				'<div class="ui-button ui-widget ui-state-default ui-corner-all" style="font-size: 0.7em; padding: 5px; position: absolute; top: 20px; right: 10px;">Click here to add Themeswitcher!</div>')
				.appendTo('body')
				.bind(
						"click",
						function() {
							ts.text("Loading Themeswitcher...");
							$
									.getScript(
											'http://ui.jquery.com/applications/themeroller/themeswitchertool/',
											function() {
												ts
														.removeClass(
																"ui-button ui-widget ui-state-default ui-corner-all")
														.text("").unbind(
																"click")
														.themeswitcher();
											});
						});
	});
</script>
<center>
<link href="${initParam.root}/css/style.css" rel="stylesheet" />
<table>
	<thead>
		<tr>
			<th
				class="ui-table-asc ui-state-active ui-table-number ui-state-default"
				style="min-width: 2em;"><a href="#server_site_order">NO</a></th>
			<th class="ui-table-number ui-state-default"><a
				href="#server_site_order">123123</a></th>
			<th class="ui-table-number ui-state-default" ><a
				href="#server_site_order">글제목</a></th>
			<th class="ui-table-number-de ui-state-default"
				style="min-width: 7em;">아이디</th>
			<th class="ui-table-number ui-state-default" ><a
				href="#server_site_order">날짜</a></th>
			<th class="ui-table-date-de ui-state-default" ><a
				href="#server_site_order">조회수</a></th>
		</tr>
	</thead>
	<tbody>
		<c:forEach items="${requestScope.bvo}" var="list">
			<tr>
				<td align="center">${list.no }</td>
				<td></td>
				<c:if test="${sessionScope.mvo!=null}">
				<td align="center">
				<a href="${initParam.root }/qafindByNo.do?no=${list.no }">${list.title}</a>
				</td>
				</c:if>
				<c:if test="${sessionScope.mvo==null}">
				<td align="center">${list.title}</td>
				</c:if>
				<%-- <td align="center"><a href="${initParam.root }/qafindByNo.do?no=${list.no }
												&pageNo=${requestScope.lvo.pagingBean.nowPage}
												&count=${list.count}">${list.title }</a></td> --%>
				<td align="center">${list.memberVO.id }</td>
				<td align="center">${list.writedate }</td>
				<td align="center">${list.count }</td>
			</tr>
		</c:forEach>
	</tbody>	
</table>
</center>
<br>
<center>
<table>
<tr>

<td>
		<form action="searchBoard.do" method="get">
			<select id="searchBoard" name="value">
				<option value="findByTitle">제목</option>
				<option value="findById">아이디</option>
			</select> 
</td>
<td>
	<input size="70" type="text"  name="search">
</td>
<td>
	<input type="submit" id="findBtn" value="검색">
</form>
</td>
<td>
 <form method="get" action="qawrite.do">
<c:if test="${sessionScope.mvo!=null }">
	<input type="submit" id="writeBtn" value="글쓰기">
</c:if>
</form>
</td>
</tr>
</table>
</center>